/**
 * Predefined variables
 * Name = loginScence
 * DateTime = Sun Jan 16 2022 21:54:54 GMT+0800 (中国标准时间)
 * Author = Created by zhj9922
 * FileBasename = loginScence.ts
 * gitee： https://gitee.com/coyeking
 */
 
import { _decorator, Component, Node,Label,resources,Prefab,instantiate } from 'cc';
const { ccclass, property } = _decorator;
import { audioManager } from '../framework/audioManager';
import { config } from '../config';
import { uiManager } from '../framework/uiManager';
 
@ccclass('loginScence')
export class loginScence extends Component {
    @property(Label)
    public ui_version: Label = null;
	
    onLoad () {
        this.ui_version.string = config.version;
    };
    
    onDestroy () {};
	
    /**
     * 按钮点击事件
     * @param event 
     * @param customEventData 
     */
	private onClick (event: Event, customEventData: string) {
        audioManager.instance.playSound();

        if (customEventData == 'account') {
            uiManager.createLayer('prefab/login/AccountLayer','AccountLayer');
        }
    }
}

